﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Infragistics.Controls.Menus;

namespace StartupSolution.Views.Menus.Selection
{
    public partial class XamMenuXaml_Selection : Page
    {
        public XamMenuXaml_Selection()
        {
            InitializeComponent();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void XamMenu_ItemClicked(object sender, Infragistics.Controls.Menus.ItemClickedEventArgs e)
        {
            // TODO: Handle the XamMenu control ItemClicked event  
            
            // Add your custom logic here 

            XamMenuItem selectedItem = e.Item;

            if (!selectedItem.Header.Equals("File"))
            {
                MessageBox.Show("Menu Item " + selectedItem.Header + " is clicked.");
            }
        }
    }
}
